Repository navigation
fix(oauth): accept token_rotation_expiration_minutes in AsyncOAuthFlow.sqlite3 - #1625
pcbeingused333 wants to merge 3 commits into
Conversation
…w.sqlite3 OAuthFlow.sqlite3() exposes token_rotation_expiration_minutes and forwards it to OAuthSettings, but the async factory did not, so the value could not be customized without building AsyncOAuthSettings by hand. Signed-off-by: Alex Castillo <alex.castillog33@gmail.com>
|
Thanks for the contribution! Before we can merge this, we need @pcbeingused333 to sign the Salesforce Inc. Contributor License Agreement. |
mwbrooks
left a comment
There was a problem hiding this comment.
👋 Thanks @pcbeingused333, welcome to bolt-python!
| # Installation Management | ||
| installation_store=installation_store, | ||
| installation_store_bot_only=installation_store_bot_only, | ||
| token_rotation_expiration_minutes=token_rotation_expiration_minutes, |
There was a problem hiding this comment.
praise: Nice catch on the async factory drifting from the sync one! Matching the default and position keeps the two signatures easy to compare 🙌
|
@pcbeingused333 Could you sign the Salesforce CLA? We need it signed before we can continue with this PR. 🙏 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1625 +/- ##
=======================================
Coverage 91.57% 91.57%
=======================================
Files 228 228
Lines 7285 7285
=======================================
Hits 6671 6671
Misses 614 614 ☔ View full report in Codecov by Harness. |
WilliamBergamin
left a comment
There was a problem hiding this comment.
Thanks for working on this 💯
I think the change in positional agreement is a breaking change once addressed I think we can merge this 🙏
| token_rotation_expiration_minutes: int = 120, | ||
| client: Optional[AsyncWebClient] = None, | ||
| logger: Optional[Logger] = None, |
There was a problem hiding this comment.
🚦 suggestion (blocking): Could this go after logger instead? Placing it before client and logger shifts their positions for anyone passing them positionally, while appending keeps it a pure addition.
| token_rotation_expiration_minutes: int = 120, | |
| client: Optional[AsyncWebClient] = None, | |
| logger: Optional[Logger] = None, | |
| client: Optional[AsyncWebClient] = None, | |
| logger: Optional[Logger] = None, | |
| token_rotation_expiration_minutes: int = 120, |
| scopes=["chat:write", "commands"], | ||
| token_rotation_expiration_minutes=30, | ||
| ) | ||
| assert oauth_flow.settings.token_rotation_expiration_minutes == 30 |
There was a problem hiding this comment.
🧪 suggestion (non-blocking): Could we also assert on settings.authorize? That's the value the app actually uses to refresh tokens.
| assert oauth_flow.settings.token_rotation_expiration_minutes == 30 | |
| assert oauth_flow.settings.token_rotation_expiration_minutes == 30 | |
| assert oauth_flow.settings.authorize.token_rotation_expiration_minutes == 30 |
Address the positional compatibility review on slackapi#1625 and assert the expiration is forwarded to the authorizer.
|
Moved the parameter after This comment was drafted with Claude Code. |
|
@pcbeingused333 have you signed the CLA? |
|
The Salesforce CLA was signed on November 16, but the This comment was drafted with an AI coding assistant (Codex). |
|
Closing and reopening the PR forces a recheck of the CLA status by the checker and it reports that you're account has not signed it |
Follow-up to #1625, addressing WilliamBergamin's requested changes.
Move
token_rotation_expiration_minutesafterloggerinAsyncOAuthFlow.sqlite3()so existing positionalclientandloggerarguments retain their positions. Also assert that the configured expiration reachessettings.authorize, as suggested in the review. The synchronous factory is unchanged because this follow-up corrects only the newly introduced async signature.Testing
The SQLite3 OAuth tests pass (6), including the new
settings.authorizeassertion, and a signature check confirmsclientandloggerkeep their positions. Formatting and lint pass.This follow-up was prepared with an AI coding assistant (Codex).